package SetBasicsAndBSTSet;

import java.util.ArrayList;

public class Main {
    public static void main(String[] args) {
        System.out.println("Pride and PreJudice");

        ArrayList<String> words1=new ArrayList<>();
        if (FileOperation.readFile("pride-and-prejudice.txt",words1)){
            System.out.println("Total words:"+words1.size());

            BSTset<String> set1=new BSTset<>();
            for (String word:words1){
                set1.add(word);

            }
            System.out.println("Total different words:"+set1.getSize());
        }

        System.out.println();

        System.out.println("A Tale of Two Cities");

        ArrayList<String > words2 = new ArrayList<>();

        if (FileOperation.readFile("a-tale-of-two-cities.txt",words2)){
            System.out.println("Total words:"+words2.size());

            BSTset<String> set2 = new BSTset<>();
            for (String word:words2){
                set2.add(word);
            }
            System.out.println("Total different words:" + set2.getSize());
        }

    }
}
